<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>acutil: src/strutil.cpp源文件</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body onload='searchBox.OnSelectItem(0);'>
<!-- 制作者 Doxygen 1.7.4 -->
<script type="text/javascript"><!--
var searchBox = new SearchBox("searchBox", "search",false,'搜索');
--></script>
<div id="top">
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">acutil</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>首页</span></a></li>
      <li><a href="namespaces.html"><span>名字空间</span></a></li>
      <li class="current"><a href="files.html"><span>文件</span></a></li>
      <li id="searchli">
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="搜索" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>文件列表</span></a></li>
    </ul>
  </div>
<div class="header">
  <div class="headertitle">
<div class="title">src/strutil.cpp</div>  </div>
</div>
<div class="contents">
<a href="strutil_8cpp.html">浏览该文件的文档。</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 ﻿
<a name="l00005"></a>00005 <span class="preprocessor">#include &quot;<a class="code" href="strutil_8h.html" title="字符串相关工具函数">strutil.h</a>&quot;</span>
<a name="l00006"></a>00006 
<a name="l00007"></a>00007 <span class="keyword">namespace </span>{
<a name="l00008"></a>00008   <span class="keyword">const</span> <span class="keywordtype">char</span>* kdefault_trim_char_list_char = <span class="stringliteral">&quot;\n\r\t\v &quot;</span>;
<a name="l00009"></a>00009   <span class="keyword">const</span> <span class="keywordtype">wchar_t</span>* kdefault_trim_char_list_wchar = L<span class="stringliteral">&quot;\n\r\t\v &quot;</span>;
<a name="l00010"></a>00010   <span class="comment">//\0也算作默认空白字符内，因此包含在list中(字符个数+1)</span>
<a name="l00011"></a>00011   <span class="keyword">const</span> <span class="keywordtype">int</span> kdefault_trim_char_list_length = <span class="keyword">sizeof</span> (kdefault_trim_char_list_char) / <span class="keyword">sizeof</span>(<span class="keywordtype">char</span>);
<a name="l00012"></a>00012   <span class="keyword">const</span> std::string kdefault_trim_char_list(kdefault_trim_char_list_char, kdefault_trim_char_list_length);
<a name="l00013"></a>00013   <span class="keyword">const</span> std::wstring kdefault_trim_wchar_list(kdefault_trim_char_list_wchar, kdefault_trim_char_list_length);
<a name="l00014"></a>00014 }
<a name="l00015"></a>00015 
<a name="l00016"></a><a class="code" href="namespaceacutil.html">00016</a> <span class="keyword">namespace </span>acutil{
<a name="l00017"></a><a class="code" href="namespaceacutil_1_1string.html">00017</a>   <span class="keyword">namespace </span>string{
<a name="l00018"></a><a class="code" href="namespaceacutil_1_1string_1_1internal.html">00018</a>     <span class="keyword">namespace </span>internal {
<a name="l00019"></a><a class="code" href="namespaceacutil_1_1string_1_1internal.html#aa77c9f32b1443e47e608508f73788aef">00019</a>       <span class="keywordtype">void</span> <a class="code" href="namespaceacutil_1_1string_1_1internal.html#aa77c9f32b1443e47e608508f73788aef">Trim</a>(std::string&amp; s){<a class="code" href="namespaceacutil_1_1string_1_1internal.html#aa77c9f32b1443e47e608508f73788aef"></a>
<a name="l00020"></a>00020 <a class="code" href="namespaceacutil_1_1string_1_1internal.html#aa77c9f32b1443e47e608508f73788aef">        ::acutil::string::Trim</a>(s, kdefault_trim_char_list);
<a name="l00021"></a>00021       }
<a name="l00022"></a>00022 
<a name="l00023"></a><a class="code" href="namespaceacutil_1_1string_1_1internal.html#ab9e22c4dd94005f3fd467e761a93dd44">00023</a>       <span class="keywordtype">void</span> <a class="code" href="namespaceacutil_1_1string_1_1internal.html#aa77c9f32b1443e47e608508f73788aef">Trim</a>(std::wstring&amp; s){<a class="code" href="namespaceacutil_1_1string_1_1internal.html#aa77c9f32b1443e47e608508f73788aef"></a>
<a name="l00024"></a>00024 <a class="code" href="namespaceacutil_1_1string_1_1internal.html#aa77c9f32b1443e47e608508f73788aef">        ::acutil::string::Trim</a>(s, kdefault_trim_wchar_list);
<a name="l00025"></a>00025       }
<a name="l00026"></a>00026     }
<a name="l00027"></a>00027   }
<a name="l00028"></a>00028 }
</pre></div></div>
</div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>全部</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>名字空间</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>文件</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>函数</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<hr class="footer"/><address class="footer"><small>Generated at 2011年四月11日 星期一 00:05:04 for acutil by&#160;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
</body>
</html>
